/**
 *	@file	an_note_def.h
 *	@brief	アンノーンノート アプリデファイン
 *	@author	Miyuki Iwasawa
 *	@date	09.01.08
 *
 */

#ifndef __H_AN_NOTE_DEF_H__
#define __H_AN_NOTE_DEF_H__

///アプリシーケンス定義
typedef enum{
 SEQ_FADE_IN,
 SEQ_FADE_OUT,
 SEQ_MAIN,
 SEQ_PAGE_CHG,
 SEQ_EXIT,
};

///フレーム定義
#define UFRM_MSG	(GF_BGL_FRAME1_S)
#define UFRM_NOTE	(GF_BGL_FRAME2_S)
#define UFRM_BACK	(GF_BGL_FRAME3_S)

#define DFRM_MSG	(GF_BGL_FRAME1_M)
#define DFRM_NOTE	(GF_BGL_FRAME2_M)
#define DFRM_BACK	(GF_BGL_FRAME3_M)

#define UFRM_MSG_PRI	(1)
#define UFRM_NOTE_PRI	(2)
#define UFRM_BACK_PRI	(3)
#define DFRM_MSG_PRI	(1)
#define DFRM_NOTE_PRI	(2)
#define DFRM_BACK_PRI	(3)

typedef enum{
 VIEW_UP,
 VIEW_DOWN,
}VIEW_CODE;

#define MEMO_PAGE_MAX	(6)	//メモページ数最大

//////////////////////////////////////////////////////
///メッセージ関連定義

#define WORDSET_AN_NOTE_BUFLEN	(16)
#define WORDSET_AN_NOTE_BUFNUM	(16)
#define AN_NOTE_MSG_BUFLEN		(256*2)	///<メッセージ展開バッファ長

#define MU_TITLE_X	(0)
#define MU_TITLE_Y	(7*8)
#define MU_NAME_X	(22*8)
#define MU_NAME_Y	(MU_TITLE_Y+16)
#define MD_TITLE_X	(0)
#define MD_TITLE_Y	(7*8+4)
#define MD_NUM_X	(0)
#define MD_NUM_Y	(MD_TITLE_Y+16)

#define MU_ANNOON_X		(6*8)
#define MU_ANNOON_Y		(0*8)
#define MU_ANNOON_OY	(3*8)
#define MD_ANNOON_X		(MU_ANNOON_X)
#define MD_ANNOON_Y		(0*8)
#define MD_ANNOON_OY	(MU_ANNOON_OY)

#define MU_MEMO_X		(4)
#define MU_MEMO_Y		(3*8)
#define MD_MEMO_X		(4)
#define MD_MEMO_Y		(3*8)

///////////////////////////////////////////
///パレット定義
#define BACK_FONT_PAL	(9)
#define MSG_FONT_PAL	(9)
//ここまでnclの中
///////////////////////////////////
#define SBOX_PAL		(11)
#define TALK_FONT_PAL	(12)
#define BMP_TALK_WIN_PAL	(13)
#define YESNO_WIN_PAL		(14)	//2本占有

#define	FCOL_N_BLACK	( GF_PRINTCOLOR_MAKE( FBMP_COL_BLACK, FBMP_COL_BLK_SDW, 0 ) )		// フォントカラー：黒
#define	FCOL_N_WHITE	( GF_PRINTCOLOR_MAKE( FBMP_COL_WHITE, FBMP_COL_BLK_SDW, 0 ) )		// フォントカラー：白

///////////////////////////////////////////
//アクター関連
#define AN_NOTE_ACTRES_MAX	(16)	///<リソース数
#define AN_NOTE_ACTPAL_NUM	(2)	///<管理パレット数

enum{
 ACT_BACK,
 ACT_UP,
 ACT_DOWN,
 NORMAL_ACTMAX,
};

#define ICON_LINEMAX	(7)
#define ICON_ACTMAX		(ICON_LINEMAX*2)
#define AN_NOTE_ACTMAX	(NORMAL_ACTMAX+ICON_ACTMAX)

enum{
 ACT_SPRI_BACK,
 ACT_SPRI_UP,
 ACT_SPRI_DOWN,
};

enum{
 ACTRES_NORMAL,
 ACTRES_ICON,
};

enum{
 ANM_BACK,
 ANM_BACKA,
 ANM_UP,
 ANM_UP_A,
 ANM_UP_N,
 ANM_DOWN,
 ANM_DOWN_A,
 ANM_DOWN_N,
};

typedef enum{
 BACK_BTN_ACTIVE,
 BACK_BTN_ANM,
}BACK_BTN_STATE;

#define ACT_BACK_PX	(28*8)
#define ACT_BACK_PY	(22*8)

#define ACT_UP_PX	(29*8+4)
#define ACT_UP_PY	(2*8+12)
#define ACT_DOWN_PX	(ACT_UP_PX)
#define ACT_DOWN_PY	(15*8+12)

#define ACT_ICON_PX		(5*8)
#define ACT_ICON_PYU	(4*8-3)
#define ACT_ICON_PYD	(2*8-3)
#define ACT_ICON_OY		(3*8)
#define ACT_ICON_BGPRI	(1)

///////////////////////////////////////////
///BMPウィンドウ定義
enum{
 WIN_BACK,
 WIN_MSGU,
 WIN_MSGD,
 WIN_PAGE,
 WIN_MAX,
};

///ウィンドウ関連キャラ領域指定(上下共用)
#define BMP_TALK_WIN_CGX	(1)
#define BMP_START_CGX		(1)

/////////////////////////////////////////////
//上画面用

//メッセージ領域
#define	BMP_MSGU_PX		( 2 )
#define	BMP_MSGU_PY		( 3 )
#define	BMP_MSGU_SX		( 24 )
#define	BMP_MSGU_SY		( 20 )
#define BMP_MSGU_FRM	( UFRM_MSG )
#define	BMP_MSGU_PAL	( TALK_FONT_PAL )
#define BMP_MSGU_CGX_SIZ	(BMP_MSGU_SX*BMP_MSGU_SY)
#define	BMP_MSGU_CGX	( BMP_START_CGX )

/////////////////////////////////////////////
//下画面用

//メッセージ領域
#define	BMP_MSGD_PX		( 2 )
#define	BMP_MSGD_PY		( 1 )
#define	BMP_MSGD_SX		( 24 )
#define	BMP_MSGD_SY		( 20 )
#define BMP_MSGD_FRM	( DFRM_MSG )
#define	BMP_MSGD_PAL	( TALK_FONT_PAL )
#define BMP_MSGD_CGX_SIZ	(BMP_MSGD_SX*BMP_MSGD_SY)
#define	BMP_MSGD_CGX	( BMP_START_CGX )

///やめるボタン
#define	BMP_BACK_PX	( 25 )
#define	BMP_BACK_PY	( 21 )
#define	BMP_BACK_SX	( 6 )
#define	BMP_BACK_SY	( 2 )
#define BMP_BACK_FRM	( DFRM_MSG )
#define	BMP_BACK_PAL	( TALK_FONT_PAL )
#define BMP_BACK_CGX_SIZ	(BMP_BACK_SX*BMP_BACK_SY)
#define	BMP_BACK_CGX	( BMP_MSGD_CGX+BMP_MSGD_CGX_SIZ )

///ページ表示
#define	BMP_PAGE_PX	( 28 )
#define	BMP_PAGE_PY	( 9 )
#define	BMP_PAGE_SX	( 3 )
#define	BMP_PAGE_SY	( 2 )
#define BMP_PAGE_FRM	( DFRM_MSG )
#define	BMP_PAGE_PAL	( TALK_FONT_PAL )
#define BMP_PAGE_CGX_SIZ	(BMP_PAGE_SX*BMP_PAGE_SY)
#define	BMP_PAGE_CGX	( BMP_BACK_CGX+BMP_BACK_CGX_SIZ )

/////////////////////////////////////////////
//タッチパネル関連
/////////////////////////////////////////////
#define TP_BACK_X	(24*8)
#define TP_BACK_Y	(20*8)
#define TP_BACK_W	(8*8)
#define TP_BACK_H	(4*8)

#define TP_UP_X	(27*8+4)
#define TP_UP_Y	(2*8)
#define TP_UP_W	(24)
#define TP_UP_H	(21)

#define TP_DOWN_X	(TP_UP_X)
#define TP_DOWN_Y	(15*8)
#define TP_DOWN_W	(TP_UP_W)
#define TP_DOWN_H	(TP_UP_H)

#endif	//__H_AN_NOTE_DEF_H__

